package cn.com.jslh.boarpro.main.view;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.DividerItemDecoration;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.widget.SearchView;

import butterknife.BindView;
import butterknife.ButterKnife;
import cn.com.jslh.boarpro.R;
import cn.com.jslh.boarpro.main.contract.GoZhuSheContract;
import cn.com.jslh.boarpro.main.presenter.GoZhuShePresenterImpl;

public class GoZhuSheActivity extends AppCompatActivity implements GoZhuSheContract.View {

    @BindView(R.id.searchview)
    SearchView searchview;
    @BindView(R.id.recycleview)
    RecyclerView recycleview;
    private GoZhuSheContract.Presenter presenter;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_go_zhu_she);
        ButterKnife.bind(this);
        new GoZhuShePresenterImpl(this,this);
        LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this,LinearLayoutManager.VERTICAL,false);
        recycleview.setLayoutManager(linearLayoutManager);
        recycleview.addItemDecoration(new DividerItemDecoration(this,DividerItemDecoration.VERTICAL));
        presenter.bindRV(recycleview);
        presenter.start();
    }

    @Override
    public void setPresenter(GoZhuSheContract.Presenter presenter) {
        this.presenter = presenter;
    }
}
